public class ScheduleThread implements Runnable {
	
	private double timeToProcess;
	private ProcessInfo processInfo;
	private Processor processor;
	
	public ScheduleThread(double timeToProcess, ProcessInfo processInfo, Processor processor) {
		this.timeToProcess = timeToProcess;
		this.processInfo = processInfo;
		this.processor = processor;
		
	}
	
	
	@Override
	public void run() {
		double tempoRelogio = System.currentTimeMillis();
		while(tempoRelogio < timeToProcess) {
			tempoRelogio = System.currentTimeMillis();
		}
		AtomicBroadcast atomicBroadcast = new AtomicBroadcast();
		atomicBroadcast.end(processInfo.getTime(),processor);
	}
}